<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>动态为select赋值</title>
	
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="this is my page">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    
    <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
    <script type="text/javascript">
	function tab(){
		alert('ok');
		document.testForm.secondCatFormKey.innerHTML = "123";
	} 
		
    </script>
  </head>
  
  <body>
      <table>
      	<tr>
      	<td>
     <SELECT  id=select1  name=select1 style="WIDTH: 40px"  multiple>  
	  <OPTION  value=11  selected>11</OPTION>
	  <OPTION  value=22>22</OPTION>
	  <OPTION value=33>33</OPTION>  
	 </SELECT>  
	 <SELECT id=select2 name=select2  multiple></SELECT>  
	 <INPUT type="button" value="Button"  id=button1  name=button1 onclick="addslt()">  
	  </td>
	  </tr>
      </table>

   
  <script  language=javascript>  
	  function  addslt(){  
		  for(var i=0;i < select1.options.length; ++i){  
			  if(select1.options[i].selected){  
			  	var selection = select1.options[i].text;  
			  	select2.options[select2.options.length] = new Option(selection);  
			  }  
		  }  
	  }  
  </script>
  </body>
</html>
